package cn.xd.itstack.springframework.beans.factory;

import cn.xd.itstack.springframework.beans.BeansException;
import cn.xd.itstack.springframework.beans.factory.config.AutoWireCapableBeanFactory;
import cn.xd.itstack.springframework.beans.factory.config.BeanDefinition;
import cn.xd.itstack.springframework.beans.factory.config.BeanPostProcessor;
import cn.xd.itstack.springframework.beans.factory.config.ConfigurableBeanFactory;

public interface ConfigurableListableBeanFactory extends ListableBeanFactory, ConfigurableBeanFactory, AutoWireCapableBeanFactory {

    /**
     * 根据beanName获取BeanDefinition
     * @param beanName
     * @return
     * @throws BeansException
     */
    BeanDefinition getBeanDefinition(String beanName) throws BeansException;

    /**
     * 实例化单利的Bean
     * @throws BeansException
     */
    void preInstantiateSingletons() throws BeansException;

    /**
     * 添加BeanPostProcessor监听
     * @param beanPostProcessor
     */
    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);
}
